#include "Exception.h"

#include <System/String.h>
#include <System/Diagnostics/Debug.h>

// DEBUG.
#include "Debug.h"

using namespace Riccsson::System;

Exception::Exception()
	: PROP3_INIT(Exception, HResult)
{
	Diagnostics::Debug::WriteLine("throw an Exception.");
}
Exception::Exception(const char* message)
	: PROP3_INIT(Exception, HResult)
{
	m_what = new String(message);
	Diagnostics::Debug::WriteLine(m_what);
}

Exception::Exception(const String* message)
	: PROP3_INIT(Exception, HResult)
{
	m_what = const_cast<String*>(message);
	Diagnostics::Debug::WriteLine(m_what);
}

Exception::Exception(const String& message)
	: PROP3_INIT(Exception, HResult)
{
	m_what = const_cast<String*>(&message);
	Diagnostics::Debug::WriteLine(m_what);
}

Exception::~Exception(void)
{
}
